package com.gagakuai.engine.impl;

import com.gagakuai.engine.impl.command.StartProcessInstanceCmd;
import com.gagakuai.engine.runtime.ProcessInstance;
import com.gagakuai.engine.service.RuntimeService;

import java.util.List;
import java.util.Map;

/*
 * @program: common-starters
 * @description: 运行服务实现类
 * @author: houhong
 * @create: 2023-01-02 14:48
 */
public class RuntimeServiceImpl extends ServiceImpl implements RuntimeService {


    @Override
    public ProcessInstance startProcessInstanceBykey(String processDefinitionKey) {
        return commandExecutor.execute(
                new StartProcessInstanceCmd<ProcessInstance>(processDefinitionKey, null, null, null)
        );
    }

    @Override
    public ProcessInstance startProcessInstanceByKey(String processDefinitionKey, String businessKey) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceByKey(String processDefinitionKey, Map<String, Object> variables) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceByKey(String processDefinitionKey, String businessKey, Map<String, Object> variables) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey, String tenantId) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceById(String processDefinitionId) {

       return this.commandExecutor.execute(
               new StartProcessInstanceCmd<ProcessInstance>(null, processDefinitionId, null, null));

    }

    @Override
    public ProcessInstance startProcessInstanceById(String processDefinitionId, String businessKey) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceById(String processDefinitionId, Map<String, Object> variables) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceById(String processDefinitionId, String businessKey, Map<String, Object> variables) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceByMessage(String messageName) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceByMessage(String messageName, String businessKey) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceByMessageAndTenantId(String messageName, String businessKey, String tenantId) {
        return null;
    }

    @Override
    public ProcessInstance startProcessInstanceByMessage(String messageName, Map<String, Object> processVariables) {
        return null;
    }

    @Override
    public void deleteProcessInstance(String processInstanceId, String deleteReason) {

    }

    @Override
    public List<String> getActiveActivityIds(String executionId) {
        return null;
    }

    @Override
    public void signal(String executionId) {

    }

    @Override
    public void signal(String executionId, Map<String, Object> processVariables) {

    }
}